/*
 * StringRecordReader.h
 *
 */

#ifndef STRINGRECORDREADER_H_
#define STRINGRECORDREADER_H_

#include <fstream>
#include "StringRecord.h"

class StringRecordReader {
	private:
		static const char SEPARATOR = ',';

		int count;
		std::fstream file;

		BigInt toBigInt(const String& value) const;
	public:
		StringRecordReader();
		virtual ~StringRecordReader();

		int getCount() const;
		bool open(const String& path);
		bool next(StringRecord& record);
};

#endif  /* STRINGRECORDREADER_H_ */
